<?php
function deleteFile($dir) {
    if(substr($dir, strlen($dir)-1, 1) != '/') { 
        $dir .= '/'; 
    }
    if($handle = opendir($dir)) { 
        while($obj = readdir($handle)) { 
            if($obj != '.' && $obj != '..') { 
                if(is_dir($dir.$obj)) { 
                    if(!deleteFile($dir.$obj)) {
                        echo $dir.$obj."<br />";
                        return false;
                    }
                }
                elseif(is_file($dir.$obj)) { 
                    if(!unlink($dir.$obj)) {
                        echo $dir.$obj."<br />";
                        return false;
                    }
                }
            }
        }
        closedir($handle); 
        if(!@rmdir($dir)) {
            echo $dir.'<br />';
            return false;
        }
        return true;
    }
    return true;
}
if ($_GET['delete_install']=='ok'){
deleteFile('install/');
header('location: '.$base_url);
}
?>
<div class="alert alert-success fade in" style="margin-bottom:0">
      <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
      <h4><strong>Installasi Selesai!</strong></h4> Silahkan Hapus Folder <a href="<?php echo $base_url ?>/index.php?delete_install=ok">install</a><br>
Halaman Admin Anda <a href="<?php echo $base_url ?>/g-admin/"><?php echo $base_url ?>/g-admin/</a></div>